package com.autumn.config.api.dto.input;

import com.autumn.validation.constraints.NotNullOrBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 配接配置输入
 * 
 * @author 老码农
 *         <p>
 *         Description
 *         </p>
 * @date 2017-12-31 00:28:47
 */
public class ConnectionConfigureInput extends ConfigureInput {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7625641159307078616L;

	@NotNullOrBlank(message = "连接名称(name)不能为 null。")
	@Size(max = 50, min = 1, message = "连接名称为空或太长，长度不能超过50。")
	private String name;
	
	@NotNull(message = "连接类型(connectionType)不能为 null。")
	@Min(value = 1, message = "连接类型无效。")	
	private Integer connectionType;

	@NotNullOrBlank(message = "配置属性内容(propertyContent)不能为 null。")	
	private String propertyContent;

	private Long id;

	/**
	 * 获取Id
	 * 
	 * @return
	 */
	public Long getId() {
		return id;
	}

	/**
	 * 设置id
	 * 
	 * @param id
	 */
	public void setId(Long id) {
		this.id = id;
	}
	
	/**
	 * 
	 */
	public ConnectionConfigureInput() {

	}

	/**
	 * 获取名称
	 * 
	 * @return
	 */
	public String getName() {
		return name;
	}

	/**
	 * 设置名称
	 * 
	 * @param name
	 *            名称
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 获取连接类型
	 * 
	 * @return
	 */
	public Integer getConnectionType() {
		return connectionType;
	}

	/**
	 * 设置连接类型
	 * 
	 * @param connectionType
	 *            连接类型
	 */
	public void setConnectionType(Integer connectionType) {
		this.connectionType = connectionType;
	}

	/**
	 * 获取属性内容
	 * 
	 * @return
	 */
	public String getPropertyContent() {
		return propertyContent;
	}

	/**
	 * 设置属性内容
	 * 
	 * @param propertyContent
	 *            属性内容
	 */
	public void setPropertyContent(String propertyContent) {
		this.propertyContent = propertyContent;
	}
}
